package org.dtrd.modules.system.util.qywx.callback;

/**
 * @author 萧
 * @date:2021-11-12 10:30 下午
 **/
public class QwCallBackConfig {

    public static final String TOKEN = "bi9jOavcROEd0bGCbgvZzatXl";

    public static final String EncodingAESKey = "ZWQyN2Y5MDkyZWM0NDRkMDlhYmE2OTA2NmY2OGJmMmE";

    /**
     * 回调事件类型
     */
    public enum Event {
        /**
         * 修改客户信息
         */
        CHANGE_EXTERNAL_CONTACT("change_external_contact"),
        /**
         * 通讯录
         */
        CHANGE_CONTACT("change_contact");

        private String event;

        Event(String event) {
            this.event = event;
        }

        public String getEvent() {
            return event;
        }

        public void setEvent(String event) {
            this.event = event;
        }

        public static boolean isClientEvent(String event) {
            return CHANGE_EXTERNAL_CONTACT.event.equals(event);
        }

        public static boolean isEmployeeEvent(String event) {
            return CHANGE_CONTACT.event.equals(event);
        }


    }

    /**
     * 事件详情
     */
    public enum ChangeType {
        /**
         * 修改客户信息
         */
        EDIT_EXTERNAL_CONTACT("edit_external_contact"),
        /**
         * 添加客户
         */
        ADD_EXTERNAL_CONTACT("add_external_contact"),
        /**
         * 删除客户
         */
        DEL_EXTERNAL_CONTACT("del_external_contact"),
        /**
         * 删除跟进成员
         */
        DEL_FOLLOW_USER("del_follow_user");

        private String changeType;

        ChangeType(String changeType) {
            this.changeType = changeType;
        }

        public String getChangeType() {
            return changeType;
        }

        public void setChangeType(String changeType) {
            this.changeType = changeType;
        }

        public static boolean isEdit(String changeType) {
            return EDIT_EXTERNAL_CONTACT.changeType.equals(changeType);
        }

        public static boolean isAdd(String changeType) {
            return ADD_EXTERNAL_CONTACT.changeType.equals(changeType);
        }

        public static boolean isDelClient(String changeType) {
            return DEL_EXTERNAL_CONTACT.changeType.equals(changeType);
        }

        public static boolean isDelFollowUser(String changeType) {
            return DEL_FOLLOW_USER.changeType.equals(changeType);
        }


    }


}
